package com.example.modules.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

@TableName("post")
@Data
public class Post {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty("用户id")
    @NotNull(message = "用户id不能为空")
    private Integer userId;
    @ApiModelProperty("标题")
    private String title;
    @ApiModelProperty("内容")
    private String content;
    @ApiModelProperty("图片地址")
    private String pic;
    @ApiModelProperty("是否置顶")
    private Integer isTop;
    @ApiModelProperty("发帖时间")
    private Date publishTime;
    @ApiModelProperty("修改时间")
    private Date updateTime;
    @ApiModelProperty("是否删除")
    private Integer isDelete;
    @ApiModelProperty("贴子封面")
    private String coverPic;
    @ApiModelProperty("审核状态（0：待审核 1：审核通过 2：审核不通过）")
    private Integer auditStatus;
    @ApiModelProperty("分类")
    private String category;
}
